<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <div id="testid">testid DIV</div>

    <div class="testClass">testClass 测试选择器</div>
    <div class="testClass">testClass 测试选择器</div>
    <div class="testClass">testClass 测试选择器</div>


    <p>测试标签选择器</p>
    <p>测试标签选择器</p>
    <p>测试标签选择器</p>

    <script>
        var testid=document.getElementById('testid')
        console.log(testid);


        var testClass=document.querySelector(".testClass")
        testClass.innerHTML='这是querySelector获取的对象改变的数据'
        console.log(testClass);

        var p=document.querySelector("p")
        p.innerHTML='这是querySelector控制的标签....'
        console.log(p);
    </script>
    
</body>
</html>